<extend name="work/base"/>
<block name="content">
        <h1 class="site-h1">临期工作</h1>
        <table class="layui-table" lay-skin='line'  id="list" lay-filter="list" list-url="{:url('work_lists')}" del-url="{:url('delete')}" edit-url="{:url('edit')}" status-url="{:url('status_work')}" assigned-url="{:url('add_news_next')}"></table>


</block>
<block name="script">

    <script type="text/javascript">
        layui.use(['form', 'layer','table'], function () {
            var form = layui.form
                , $ = layui.$
                , laypage = layui.laypage;
            var table = layui.table;
            table.render({
                elem: '#list'
                ,url:"{:Url('work_lists')}"
                ,page:true
                ,loading:true
                ,limit:25
                ,page:{
                    layout:['prev','page','next']
                }
                ,cols: [[
                    {field:'e_time',width:90, title: '结束时间'}
                  , {field:'title', title: '需求名称'}

                ]]
            });
            table.on('row(list)', function(obj){
                console.log(obj.data.id) //得到当前行数据
                window.location.href='/wx/stories/index?stories_id=' +obj.data.id;
            });

        });
    </script>
</block>